﻿using System.Windows;
using FeatureDemo.Helper;
using Microsoft.Phone.Controls;

namespace FeatureDemo
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            this.Loaded += (s, e) =>
            {
                InitMe();
            };

            dh.NavigateTo += (s, e) =>
            {
                NavigationService.Navigate(e.Uri);
            };
        }

        DemoHelper dh = new DemoHelper();

        private void InitMe()
        {
            if (_init)
            {
                return;
            }

            dh.CreatePanorama(_panorama);

            _init = true;
        }

        bool _init = false;
    }
}